import { defineConfig,loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
  plugins: [vue()],
  base: process.env.NODE_ENV === 'production' ? 'http://10.100.5.51:8808/weeklyReport/workOrder/':'/', // Set your desired base URL here
  server: {
    open: false,
    port: 3000,
    host:true,
    proxy: {
      '/api': {
        target: 'http://localhost:3002/api', // 
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '')
      },
    },
  },

})
